import Vue from "vue";
import App from "./App";
import axios from "axios";
import ElementUI from "element-ui";
import RamblerNotification from "@/components/notification";
import logger from "@/components/log";
import ramblerService from "./service";
import RamblerForage from "./storage";
// 注册图标
import SvgIcon from "@/icon";

import "styl/reset.css";

Vue.use(ElementUI, { size: "medium" });
Vue.use(RamblerNotification, { name: "ramblerNotification" });
Vue.prototype.$ramblerNotification({ title: "title", message: "message" });
Vue.prototype.$axios = axios;
Vue.prototype.$logger = logger;
Vue.prototype.$chromeService = ramblerService;
Vue.prototype.$storage = new RamblerForage([
    "favicon",
    "static_background",
    "dynamic_background",
]);
Vue.config.productionTip = false;

/**
 * 公共组件
 */
Vue.component("RamblerIcon", SvgIcon);

new Vue({
    render: (h) => h(App),
}).$mount("#app");
